const HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports={
    /*  //这个是不可以调试源码的选项
    devtool: 'cheap-module-eval-source-map',
    */
    devtool: 'source-map',
    entry:"./src/app.ts",
    output: {
        filename: './dist/app.js'
    },
    
    resolve: {
        extensions: ['*','.ts','.js','html']
    },
    
    module: {
        loaders: [
       { test: /.ts$/, loader: 'ts-loader' },
        {
        test: /\.html$/,
        loader: 'html-loader'
      },
        ]
    },
    plugins:[
            new HtmlWebpackPlugin({
                    template: './src/index.html'
            }),
    ],
     devServer: {
    historyApiFallback: true,
    stats: 'minimal'
  }
}